package com.xxj.puzzlesheep;

import android.app.Activity;
import android.os.Bundle;

public class PuzzleMain extends Activity {

	private PuzzleView view;

	@Override
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		view = new PuzzleView(this);
		view.setScreen(new PuzzleMenuScreen("menu.jpg", this));
		view.mainLoop();
	}

	@Override
	protected void onPause() {
		if (view != null) {
			view.setRunning(false);
		}
		super.onPause();
	}

	@Override
	protected void onStop() {
		if (view != null) {
			view.setRunning(false);
		}
		super.onStop();
	}

	public PuzzleView getView() {
		return view;
	}

}